export default {
  data() {
    return {
      imgUrl: '',
      imgVisible: false,
      videoUrl: '',
      videoVisible: false
    }
  },
  methods: {
    previewImg(url) {
      if (!url) {
        this.$errorMessage('图片不存在, 无法展示')
        return
      }
      this.imgUrl = url
      this.imgVisible = true
    },
    previewVideo(url) {
      if (!url) {
        this.$errorMessage('视频不存在, 无法展示')
        return
      }
      this.videoUrl = url
      this.videoVisible = true
    }
  }
}
